/*
 * CFinisherStats.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of Expression program is undefined on line 8, column 40 in Templates/Licenses/license-gplv3.txt..
 * 
 * Expression program is undefined on line 10, column 19 in Templates/Licenses/license-gplv3.txt. is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Expression program is undefined on line 15, column 19 in Templates/Licenses/license-gplv3.txt. is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Expression program is undefined on line 21, column 30 in Templates/Licenses/license-gplv3.txt..  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsstats;

/**
 *
 * @author Mani
 */
public class CFinisherStats {
    public String m_name;
    public double m_comboPointsTotal[] = {0,0,0,0,0};

    CFinisherStats(String p_name)
    {
        m_name = p_name;
    }

    public void addFinisher(int p_comboPoints)
    {
        m_comboPointsTotal[p_comboPoints - 1] += 1;
    }

    public double getFinisher(int p_comboPoints)
    {
        return m_comboPointsTotal[p_comboPoints - 1];
    }

    public double getTotal()
    {
        double l_total = 0;
        for (int i = 0; i < 5; i++)
        {
            l_total += this.m_comboPointsTotal[i];
        }

        return l_total;
    }

    public void add(CFinisherStats p_finisherStats)
    {
        for (int i = 0; i < 5; i++)
        {
            m_comboPointsTotal[i] += p_finisherStats.m_comboPointsTotal[i];
        }
    }

    public void divideBy(int p_iterations)
    {
        for (int i = 0; i < 5; i++)
        {
            m_comboPointsTotal[i] /= p_iterations;
        }
    }
}
